package com.icloud.wallet.boot.controller.admin;

import com.icloud.common.core.api.CommonResult;
import com.icloud.wallet.boot.dto.WithdrawPaymentDto;
import com.icloud.wallet.boot.service.CustomerWalletService;
import com.icloud.wallet.boot.vo.WithdrawPaymentVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@RestController
@Api(tags = "Admin支付接口")
@RequestMapping("/admin/wallet")
@RequiredArgsConstructor
public class AdminWalletController {
    private final CustomerWalletService customerWalletService;

    @ApiOperation("支付提现订单")
    @PostMapping("/withdraw/payment")
    @ResponseBody
    CommonResult<WithdrawPaymentVO> withdrawPayment(@RequestBody @Valid WithdrawPaymentDto dto){
        return CommonResult.success(customerWalletService.withdrawPayment(dto));
    }
}
